<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<h1>Home home</h1>
<link rel="stylesheet" type="text/css" href="{$app_path}{$static_path}/easy-ui/themes/default/easyui.css">
    <link rel="stylesheet" href="{$app_path}{$static_path}/css/kube.css" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="{$app_path}{$static_path}/easy-ui/themes/icon.css">
    <style type="text/css">
    .class1{
        background-color: green;
    	 width: 150px;
        height: 150px;
        float: left;
        margin-right: 20px;
    	text-align:center;
    }
</style>
    <script type="text/javascript" src="{$app_path}{$static_path}/js/prettify.js"></script>
	<script src="{$app_path}{$static_path}/js/jquery.min.js"></script>
	<script type="text/javascript" src="{$app_path}{$static_path}/easy-ui/jquery.easyui.min.js"></script>
    <script type="text/javascript">
    $(function () {
        $('#tt').tabs({
            onLoad: function (panel) {
                var plugin = panel.panel('options').title;
                panel.find('textarea[name="code-' + plugin + '"]').each(function () {
                    var data = $(this).val();
                    data = data.replace(/(\r\n|\r|\n)/g, '\n');
                    if (data.indexOf('\t') == 0) {
                        data = data.replace(/^\t/, '');
                        data = data.replace(/\n\t/g, '\n');
                    }
                    data = data.replace(/\t/g, '    ');
                    var pre = $('<pre name="code" class="prettyprint linenums"></pre>').insertAfter(this);
                    pre.text(data);
                    $(this).remove();
                });
                prettyPrint();
            }
        });
        var sw = $(window).width();
        if (sw < 767) {
            $('body').layout('collapse', 'west');
        }
        $('.navigation-toggle span').bind('click', function () {
            $('#head-menu').toggle();
        });
        $(".tabs-header").bind('contextmenu',function(e){
			e.preventDefault();
			$('#rcmenu').menu('show', {
				left: e.pageX,
				top: e.pageY
			});
		});
        
		//关闭当前标签页
		$("#closecur").bind("click",function(){
			var tab = $('#tt').tabs('getSelected');
			var index = $('#tt').tabs('getTabIndex',tab);
			$('#tt').tabs('close',index);
		});
		//关闭所有标签页
		$("#closeall").bind("click",function(){
			var tablist = $('#tt').tabs('tabs');
			for(var i=tablist.length-1;i>=0;i--){
				$('#tt').tabs('close',i);
			}
		});
		//关闭非当前标签页（先关闭右侧，再关闭左侧）
		$("#closeother").bind("click",function(){
			var tablist = $('#tt').tabs('tabs');
			var tab = $('#tt').tabs('getSelected');
			var index = $('#tt').tabs('getTabIndex',tab);
			for(var i=tablist.length-1;i>index;i--){
				$('#tt').tabs('close',i);
			}
			var num = index-1;
			for(var i=num;i>=0;i--){
				$('#tt').tabs('close',0);
			}
		});
		//关闭当前标签页右侧标签页
		$("#closeright").bind("click",function(){
			var tablist = $('#tt').tabs('tabs');
			var tab = $('#tt').tabs('getSelected');
			var index = $('#tt').tabs('getTabIndex',tab);
			for(var i=tablist.length-1;i>index;i--){
				$('#tt').tabs('close',i);
			}
		});
		//关闭当前标签页左侧标签页
		$("#closeleft").bind("click",function(){
			var tab = $('#tt').tabs('getSelected');
			var index = $('#tt').tabs('getTabIndex',tab);
			var num = index-1;
			for(var i=0;i<=num;i++){
				$('#tt').tabs('close',0);
			}
		});
    });
    //增加不重复的tab
    function addTab(title, url){
		if ($('#tt').tabs('exists', title)){
			$('#tt').tabs('select', title);
		} else {
			var content=url;
			$('#tt').tabs('add',{
				title:title,
				href:content,
				closable:true
			});
		}
	}
    </script>
   
</head>
<body class="easyui-layout" style="text-align:left">

<div region="north" border="false" class="group wrap header" style="height:66px;font-size:100%">
<h1>欢迎您：{$_SESSION['nickname']}</h1>
</div>
<div region="west" split="true" title="后台管理系统" style="width:10%;min-width:100px;padding:5px;">
    <ul class="easyui-tree">
	        <li iconCls="icon-layout"><span>用户管理</span>
	            <ul>
	                <li iconCls="icon-gears"><a href="#"  onclick="addTab('用户管理','{$app_path}/admin.php/user/index')">用户管理</a></li>
	                 <li iconCls="icon-gears"><a href="#"  onclick="addTab('资金管理','{$app_path}/admin.php/user/userpay')">用户资金</a></li>
	                 <li iconCls="icon-gears"><a href="#"  onclick="addTab('平台费率','{$app_path}/admin.php/rate/index')">平台费率</a></li>
	                 <li iconCls="icon-gears"><a href="#"  onclick="addTab('短信配置','{$app_path}/admin.php/Sendkey/index')">短信配置</a></li>
	            </ul>
	        </li>
	        <li iconCls="icon-layout"><span>域名管理</span>
	            <ul>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('域名审核','{$app_path}/admin.php/domain/index')">域名审核</a></li>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('可交易域名','{$app_path}/admin.php/domain/cantra')">可交易域名</a></li>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('域名转出','{$app_path}/admin.php/turndomlog/index')">域名转出</a></li>
	                <li iconCls="icon-gears"> <a href="#" onclick="addTab('注册商管理','{$app_path}/admin.php/regbusi/index')">注册商管理</a></li>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('抵押中的域名','{$app_path}/admin.php/domain/mortdomain')">抵押中的域名</a></li>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('类型列表','{$app_path}/admin.php/dcategory/index')">类型列表</a></li>
	            </ul>
	        </li>
	        <li iconCls="icon-layout"><span>交易管理</span>
	            <ul>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('域名交易流水','{$app_path}/admin.php/trans/index')">域名交易流水</a></li>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('委托卖买','{$app_path}/admin.php/trans/enstruts')">委托买卖</a></li>
	            </ul>
	        </li>
	        <li iconCls="icon-layout"><span>配资管理</span>
	            <ul>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('投资标','{$app_path}/admin.php/credit/invert')">投资标</a></li>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('借款标','{$app_path}/admin.php/credit/loader')">借款标</a></li>
	                <li iconCls="icon-gears"><a href="#" onclick="addTab('借款流水','{$app_path}/admin.php/credit/credflow')">借款流水</a></li>
	            </ul>
	        </li>
	        <li iconCls="icon-layout"><span>财务管理</span>
	            <ul>
					<li iconCls="icon-gears"><a href="#"  onclick="addTab('充值记录','{$app_path}/admin.php/user/record')">充值记录</a></li>
					<li iconCls="icon-gears">
						<a href="#"  onclick="addTab('投资信息','{$app_path}/admin.php/Depost/index')">提现记录</a>
					</li>
					<li iconCls="icon-gears"><a href="#"  onclick="addTab('平台收益','{$app_path}/admin.php/Platform/index')">平台收益</a></li>
	            </ul>
	        </li>
    </ul>
</div>
<div region="center">
    <div id="tt" class="easyui-tabs" fit="true" border="false" plain="true">
       <div title="welcome">
       	<div class="class1">今日交易总额<br/>{$daytransmoney}￥</div>
       	<div class="class1">今日借款总额<br/>{$dayvestermoney}￥</div>
       	<div class="class1">等待还息借款总额<br/>{$ratevestermoney}￥</div>
       	<div class="class1">历史交易总额<br/>{$transmoney}￥</div>
       	<div class="class1">历史借款总额<br/>{$vestermoney}￥</div>
       </div>
    </div>
    <div id="rcmenu" class="easyui-menu" style="">
			<div data-options="iconCls:'icon-cancel'" id="closecur">
				关闭当前页
			</div>
			<div id="closeall">
				关闭全部
			</div>
			<div id="closeother">
				关闭其他
			</div>
			<div class="menu-sep"></div>
			<div id="closeright">
				关闭右侧标签页
			</div>
			<div id="closeleft">
				关闭左侧标签页
			</div>
	</div>
	
</div>
<div data-options="region:'south',split:true" style="height:50px;"></div>
</body>
</html>